// 鼠标经过加号显示要添加的内容
var addition = document.getElementsByClassName("addition")[0];
var img = addition.getElementsByTagName("img")[0];
var add = addition.getElementsByClassName("add")[0];
img.onmouseover = function(){
    add.style.display = "block";
}
// img.onmouseleave = function(){
//     add.style.display = "none";
// }
//点击添加子项目 模态框显示
img.onclick = function(){
   var mask = document.querySelector("#mask");
   var addProject = document.querySelector("#addProject");
   mask.setAttribute("class","maskShow");
   addProject.setAttribute("class","projectShow");
console.log(addProject)
}
//添加子项目完成时，点击确定或取消 撤销模态框和蒙版
var Pcontent2 = document.querySelector(".Pcontent2");
var btn1 = Pcontent2.querySelectorAll("button")[0];
btn1.onclick = function(){
    var mask = document.querySelector("#mask");
   var addProject = document.querySelector("#addProject");
   mask.setAttribute("class","maskShowNone");
   addProject.setAttribute("class","projectShowNone");
}
var btn2 = Pcontent2.querySelectorAll("button")[1];
btn2.onclick = function(){
    var mask = document.querySelector("#mask");
   var addProject = document.querySelector("#addProject");
   mask.setAttribute("class","maskShowNone");
   addProject.setAttribute("class","projectShowNone");
}
//当点击详情的时候跳转到项目详情页
var more = document.querySelectorAll(".more");
console.log(more)
more[0].onclick = function (){
    // location.href="Project-Details.html";
    location.href="www.baidu.com"
}

